package tw.brad.android.test;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class Page3 extends Activity implements OnClickListener {
	/** Called when the activity is first created. */
	Button mainButton, p2Button, finishButton; 
	@Override
	public void onCreate(Bundle savedInstanceState) {
	  super.onCreate(savedInstanceState);
	  setContentView(R.layout.page3);
	    
	  mainButton = (Button)findViewById(R.id.mainButton);
	  mainButton.setOnClickListener(this);

	  p2Button = (Button)findViewById(R.id.p2Button);
	  p2Button.setOnClickListener(this);

	  finishButton = (Button)findViewById(R.id.finishButton);
	  finishButton.setOnClickListener(this);
	}
	
	public void onClick(View v) {
		// TODO Auto-generated method stub
		if (v.equals(finishButton)) finish();
		if (v.equals(mainButton)){
			Intent intent = new Intent();
			intent.setClass(this, IntentTest.class);
			startActivity(intent);
		}
		if (v.equals(p2Button)){
			Intent intent = new Intent();
			intent.setClass(this, Page2.class);
			startActivity(intent);
		}
		
	}
	
}